/*
 * @Author: your name
 * @Date: 2020-03-26 09:41:08
 * @LastEditTime: 2020-03-26 09:41:10
 * @LastEditors: Please set LastEditors
 * @Description: 有单做
 */

// 获取cookie
export const getCookie = "http://www.127yjs.com/portal/login/index.html"
// 获取验证码
export const getCaptcha = "http://www.127yjs.com/new_captcha.html"
// 登录
export const getLogin = "http://www.127yjs.com/portal/login/dosuccess.html"
// 接单
export const getAcceptTask = "http://spi.127yjs.com/api.php/home/index/index"


export function ajaxFun(url, param, fun) {
    window.api.ajax({
        url: url,
        method: param.type,
        headers: {
            "X-Requested-With": "XMLHttpRequest",
            "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
        },
        dataType: 'json',
        returnAll: false,
        async: false,
        data: {
            values: param.data
        }
    }, fun)
}